<template>
  <div class="page-field">
    <div class="page-part form-body">
      <mt-radio
        class="page-part" align="right" title="选择数据类型" v-model="taskData" :options="taskDataOptions"
      />

    </div>

    <div class="page-part form-submit">
      <mt-button type="default" v-on:click="back">上一步</mt-button>
      <mt-button type="primary" v-on:click="next">下一步</mt-button>
    </div>

  </div>

</template>

<script>
export default {
  props: {
    taskData: {
      type: String,
      default: '',
    },
  },
  data() {
    return {};
  },
  watch: {
    // eslint-disable-next-line
    taskData: function(value) {
      this.$emit('update:taskData', value);
    },
  },
  methods: {
    next() {
      this.$emit('checkout', 'f-task-trade');
    },
    back() {
      this.$emit('checkout', 'f-task-base');
    },
  },
  created() {
    this.taskDataOptions = [
      {
        label: '文本',
        value: '1',
      }, {
        label: '图片',
        value: '2',
      }, {
        label: '视频',
        value: '3',
      }, {
        label: '音频',
        value: '4',
      }, {
        label: '调查',
        value: '5',
      },
    ];
  },
};
</script>

<style lang="css">

.form-body {
  text-align: left;
  margin-left: 10px;
  margin-top: 20px;
  color: #42b983;
}

</style>
